# 读取json数据文件
import json

from config import BASE_DIR


def read_json_data(filename):
    # 1.读取json文件的内容
    file_path = BASE_DIR + "/data/" + filename
    with open(file=file_path, mode="r", encoding="utf-8") as f:
        json_data = json.load(f)
    # 2.遍历json文件的内容, 将所有的键值添加到空列表中
    test_cae_list = []
    for data in json_data:
        test_cae_list.append(tuple(data.values()))
    print(test_cae_list)
    return test_cae_list


if __name__ == '__main__':
    read_json_data('login.json')
